<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" th:href="@{/favicon.ico}" type="image/x-icon" />
    <link rel="stylesheet" th:href="@{/css/hello.css}">
    <link rel="stylesheet" th:href="@{/css/app.css}">
    <title>Blog</title>
</head>
<body>
    <div class="content">
        <div class="content-time">
            <div id="h">12</div>
            <span>:</span>
            <div id="m">55</div>
            <span>:</span>
            <div id="s">01</div>
        </div>
        <p>这是我的个人博客，欢迎来一起交流学习！</p>
        <p>努力的意义，不在于一定会让你取得多大的成就，只是让你在平凡的日子里，活得比原来的那个自己更好一点。</p>
        <a th:href="@{/home}">看看吧</a>
    </div>
</body>
<script>
    function time(){
        let date=new Date();
        let hBox=document.getElementById('h');
        let mBox=document.getElementById('m');
        let sBox=document.getElementById('s');
        let h=date.getHours();
        let m=date.getMinutes();
        let s=date.getSeconds();
        if(s>=0&&s<=9){
            sBox.innerText="0"+s;
        }else sBox.innerText=s;
        if(m>=0&&m<=9){
            mBox.innerText="0"+m;
        }else mBox.innerText=m;
        hBox.innerText=h;
    }
    setInterval(time,1000);
</script>
</html>